home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / knowhow4 / kh_graf.h < prev    next >
C/C++ Source or Header  |  1994-10-10  |  2KB  |  71 lines

  1. #ifndef __KNOW_HOW_GRAF_H_
  2. #define __KNOW_HOW_GRAF_H_
  3.  
  4. #include "grafic.h"
  5. #include "window.h"
  6.  
  7. class KH_Graf : public Window, public Grafic
  8.     {
  9.     protected:
  10.  
  11.     public:
  12.         KH_Graf(rect coordinates, char* fName = "", char* h = "",
  13.            int s = 0, BORDERS b_type = SHOW_BORDER,
  14.            BORDERS hdr_b_type = SHOW_BORDER,
  15.            int pat = 0, int hdr_pat = 0,
  16.            int ax_col = 0, int lab_col = 0, int grid_style = 5,
  17.            int save_file_name = 0);
  18.  
  19.     virtual void show();
  20.     virtual void exe(int act = 0);
  21. /* touch() function is used as described below.
  22.    i == 0: write "KH_GRAF" to global[0]
  23.  
  24.    i == -1 : get options from KNOW-HOW global variables.
  25.  
  26.    global_i[1]       :            axes used (1, 2, 4, 8 or dizuction).
  27.  
  28.    global_i[2]       :            x1, number of ticks, -1 for autocalculation.
  29.    global_i[3]       :            x1, number of sub-ticks.
  30.    global_i[4]       :            x1, orientation of labels.
  31.  
  32.    global_i[5]       :            y1, number of ticks, -1 for autocalculation.
  33.    global_i[6]       :            y1, number of sub-ticks.
  34.    global_i[7]       :            y1, orientation of labels.
  35.  
  36.    global_i[8]       :            x2, number of ticks, -1 for autocalculation.
  37.    global_i[9]       :            x2, number of sub-ticks.
  38.    global_i[10]      :            x2, orientation of labels.
  39.  
  40.    global_i[11]      :            y2, number of ticks, -1 for autocalculation.
  41.    global_i[12]      :            y2, number of sub-ticks.
  42.    global_i[13]      :            y2, orientation of labels.
  43.  
  44.    global_i[20 - n]  :            x1, ticks.
  45.    global_i[n - m]   :            x1, sub_ticks.
  46.  
  47.    global_i[40 - n]  :            y1, ticks.
  48.    global_i[n - m]   :            y1, sub_ticks.
  49.  
  50.    global_i[60 - n]  :            x2, ticks.
  51.    global_i[n - m]   :            x2, sub_ticks.
  52.  
  53.    global_i[80 - n]  :            y2, ticks.
  54.    global_i[n - m]   :            y2, sub_ticks.
  55.  
  56.    global[0]         :            "KH_GRAF"
  57.  
  58.    global[10 - n]    :            x1, ticks labels.
  59.    global[30 - n]    :            y1, ticks labels.
  60.    global[50 - n]    :            x2, ticks labels.
  61.    global[70 - n]    :            x2, ticks labels.
  62.  
  63.    global[1 - 8]     :            min and max double values for all axes.
  64.  
  65. */
  66.         virtual void touch(int i = 0);
  67.         int calc_work_rect();
  68.     };
  69.  
  70.  
  71. #endif __KNOW_HOW_GRAF_H_